package com.newly.center.business.api;


import com.newly.api.business.feign.MQTTOTAClient;
import com.newly.center.business.service.MQTTOTAService;
import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping(ServerUriConstant.NEWLY_BUSINESS_MQTT_OTA)
public class MQTTOTAController implements MQTTOTAClient {

    @Autowired
    MQTTOTAService MQTTOTAService;

    @Override
    public R setOTAByFile(String productKey, MultipartFile file) {
        return MQTTOTAService.setOTAByFile(productKey,file);
    }

    @Override
    public R setOTAByHttp(String productKey,String fileUrl) {
        return MQTTOTAService.setOTAByHttp(productKey,fileUrl);
    }


}
